package com.atyuntuku.yuntuku.service;

import cn.hutool.json.JSONObject;
import com.atyuntuku.yuntuku.annotation.AuthCheck;
import com.atyuntuku.yuntuku.common.BaseResponse;
import com.atyuntuku.yuntuku.constant.UserConstant;
import com.atyuntuku.yuntuku.controller.request.UserAddRequest;
import com.atyuntuku.yuntuku.controller.request.UserQueryRequest;
import com.atyuntuku.yuntuku.controller.request.UserRegisterRequest;
import com.atyuntuku.yuntuku.pojo.User;
import com.atyuntuku.yuntuku.vo.UserVO;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.IService;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * ClassName: UserService
 * Package: com.atyuntuku.yuntuku.service
 * Description:
 *
 * @Author qinglong wei
 * @Create 2025/10/5 11:30
 * @Version 1.0
 */
public interface UserService extends IService<User> {
    //注册
    public BaseResponse<Boolean> userRegister(UserRegisterRequest userRegisterRequest);

    //登录
    public BaseResponse<UserVO> userlogin(String userAccount, String userPassword, HttpServletRequest request);

    //注销
    public BaseResponse<Boolean> userlogout(HttpServletRequest request);

    //查询脱敏后的用户列表信息
    public List<UserVO> getUserVOList(List<User> list);

    //根据id来查找用户
    public BaseResponse<UserVO> getUserById(Long id);

    //管理员操作
    //增加用户
    public BaseResponse<Boolean> addUser(UserAddRequest userAddRequest);

    //用于下面那个分页查询获取条件构造器
    public QueryWrapper<User> getQueryWrapper(UserQueryRequest userQueryRequest);

    //分页查询
    public JSONObject getUserListPage(UserQueryRequest queryRequest);

    public UserVO getUserVo(User user);
}
